/**
 * 
 */
package org.vsg.stock.core.indicator.coordinate;

import java.util.List;
import java.util.Vector;

import org.vsg.stock.core.indicator.coordinate.origpoint.KLineODPFactory;
import org.vsg.stock.core.kline.DailyKLineStock;

/**
 * @author Bill Vison
 *
 */
public class FullKLineOPConverter implements OPConverter {
	
	/**
	 * defined kline op factory
	 */
	private KLineODPFactory klineOPFactory = KLineODPFactory.getInstance();

	@Override
	public List<OriginalDataPoint> convertKLineToCoordinatePoint(DailyKLineStock klineStock) {
		
		Vector<OriginalDataPoint> orgDataPoints = new Vector<OriginalDataPoint>();

		OriginalDataPoint openPoint = klineOPFactory.createODPFromPriceOpen(klineStock);
		orgDataPoints.add( openPoint );
		
		OriginalDataPoint highPoint = klineOPFactory.createODPFromPriceHigh(klineStock);
		orgDataPoints.add( highPoint );

		OriginalDataPoint lowPoint = klineOPFactory.createODPFromPriceLow(klineStock);
		orgDataPoints.add( lowPoint );		
		
		OriginalDataPoint closePoint = klineOPFactory.createODPFromPriceClose(klineStock);
		orgDataPoints.add( closePoint );	

		return orgDataPoints;
	}

	
	
}
